import  router  from "./index";
import menu from './page'  
const dynamicRouter = ()=>{
    //把menu这个数组的数据放置在index路由下面
    menu.forEach(item=>{
        router.addRoute('Index',item)
    })
    //不匹配的路由就让它跳转到404页面
    router.addRoute( 
        {
        path:'/:path(.*)+',
        redirect:'/404'
       }
      )
}
dynamicRouter()